<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 1.函数构造 Star（明星） 泛指的某一大类 
        function Star(uname,age,sex) {
            this.name = uname 
            this.age = age 
            this.sex = sex 
            this.sing = function(song) {
                console.log(song);
            }
        }
        // 2.对象 特指 是一个具体的事物 刘德华 == {name: "刘德华", age: 18, sex: "男", sing: ƒ}
        var ldh = new Star('刘德华',18,'男')
        console.log(ldh);
        // 3.我们利用构造函数创建对象的过程也称为对象的实例化
        ldh.sing('冰雨')
    </script>
</head>
<body>
    
</body>
</html>